package com.olah.gateway;

import com.olah.common.utils.ApiGenerate;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

import java.io.File;

@SpringBootApplication
@EnableDiscoveryClient
public class GatewayApp {

    public static void main(String[] args) {
        File apiFolder = new File("api");
        if (apiFolder.exists() && apiFolder.isDirectory()) {
            apiFolder.delete();
        }
        SpringApplication.run(GatewayApp.class);
        ApiGenerate.generate();
    }

}
